package com.hmall.common.client;

import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @author 29143
 */
@FeignClient("userservice")
public interface UserClient {

    @GetMapping("/address/{addressId}")
    public Address getAddress(@PathVariable("addressId")Long addressId);

    @GetMapping("/user/{userId}")
    public User findUserById(@PathVariable("userId")Long userId);

    @PutMapping("/user/price/{userId}/{money}")
    public void findMoney(@PathVariable("userId")Long userId,@PathVariable("money")Long money);


}
